package com.rongkang.interview.juc.cas;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Description:
 * @author: 荣康
 * @date: 2021/12/2
 */
public class CASDemo {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger(100);
        atomicInteger.compareAndSet(100,200);
        System.out.println(atomicInteger.get());
        atomicInteger.getAndIncrement();
    }
}
